package cn.sharp.bbs.entity.DO;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class BrowseRecord implements Serializable {
    private Long userId;
    private Long postId;
    private int score = 1;
    private Date time;

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(userId);
        sb.append(",");
        sb.append(postId);
        sb.append(",");
        sb.append(score);
        sb.append(",");
        sb.append(time);
        sb.append("\n");
        return sb.toString();
    }
}
